home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_11333.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  74 lines

  1. -- card: 11333 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 3837
  5. -- name: MoveFile
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=82 top=302 right=324 bottom=182
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Install
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put installres(XFCN,MoveFile) into it
  24.   if it is empty then play oops
  25.   else answer it
  26. end mouseUp
  27.  
  28.  
  29.  
  30. -- part contents for background part 5
  31. ----- text -----
  32. MoveFile
  33.  
  34. -- part contents for background part 10
  35. ----- text -----
  36. 7
  37.  
  38. -- part contents for background part 6
  39. ----- text -----
  40.  
  41. This moves files between folders on the same volume
  42. (it can't be used to copy files between volumes). 
  43.  
  44.  
  45.  
  46.  
  47.  
  48. Thanks to:
  49. Dewi Williams
  50. 2227 Juniper Court
  51. Boulder CO 80302
  52. (303) 443 9038
  53. Delphi: DEWI
  54.  
  55.  
  56. -- part contents for background part 7
  57. ----- text -----
  58. Syntax:
  59.  
  60. put MoveFile ("OldName",
  61. "NewFolder") into result
  62.  
  63. "OldName" is a full pathname of the file that you want to rename.
  64.  
  65. "Newfolder" specifies the destination folder.
  66. Do not put quotation marks around 
  67. "OldName" and "NewName"
  68.  
  69. The result will contain either 
  70. 0 (meaning a successful operation),
  71. 1 (meaning a parameter error), or
  72. a negative number (representing an operating system error).
  73.  
  74. You can use the 'OsErr' function provided in the script of this stack to interpret operating system errors.